<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Name:  Users Model
*
* Author: John Schop, john.schop@gmail.com
*
*/

class Users_model extends CI_Model
{
	

	public function __construct()
	{
		parent::__construct();
		$this->load->database();
	}
	

	/**
	 * Get all Selections
	 *
	 * @access public
	 * @return object
	 */
	function get_all()
	{
		
		return $this->db->get('users')->result();
	}

    function get_number_of_users()
    {
        return $this->db->count_all('users');
    }

    /**
     * Get Selection by user_id
     *
     * @access public
     * @param string $user_id
     * @return object result object
     */
    function get_by_id($user_id)
    {
        return $this->db->get_where('users', array('id' => $user_id))->row();
    }


}
